/**
 * 登录模块，提供登录相关业务功能
 * 
 * @Date: 2015-6-16
 * @author: Jackson wang
 * @version: 1.0
 * @since: 1.0
 */
define(["jquery", "datagridServ","sysmanMain", "bizProto","btnServ"],
		function($,datagridServ, sysmanMain, bizProto,btnServ) {

			'use strict';

			var 
				//锚记datagrid目标元素
				
				//初始化后的datagrid dom对象
				$grid,
				//编辑弹窗对象及弹窗按钮对象
				$edit_window,$edit_window_height=500,$edit_window_width=900,window_btn,
				
				//业务表单对象
				viewPageUrl='/executeMonitor/query/editPage.action'			
				
			var public_method = {				
				
				
				clickRow:function(index,data){
					if(window.console){
						console.info('clicked index: ' + index)
					}
					
					$grid = $(sysmanMain.getCurrentTab()).find('table.dg-list')
					$edit_window=$('#executemonitor-win')
					
					$($grid).datagrid('clearSelections')
					$($grid).datagrid('selectRow',index)
					var rootPath = '/'+sysmanMain.getRootPath();
					
					//var $grid = $('#panel-executemonitor table.dg-list')
					
					var _param = {
						grid:$grid,
						window:$edit_window,
						href:rootPath + viewPageUrl,						
						width:$edit_window_width,
						height:$edit_window_height,
						flag:false,
						existCheckElement:'form',
						onClose:private_method.onClose
					}
					
					datagridServ.windowEdit(_param)
				}
				

			};
			
			var private_method ={
				onClose:function(){
					$($edit_window).empty();
				}
			}

			
			return public_method;

		});